/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.migracion.components;

import com.migracion.components.util.StatementRequest;
import java.util.HashMap;

/**
 *
 * @author stevenziggiz
 */
public class Migration {

    private Table sourceTable; //Estructura interna de la tabla origen con sus campos
    private Table destinyTable; //Estructura interna de la tabla destino con sus campos
    private StatementRequest connectionSourceTable; //Informacion de la conexión a BD
    private StatementRequest connectionDestinyTable; //Informacion de la conexión a BD
    //Se deben que colocar los INDEX de cada tabla, iniciando con el KEY que es 
    //la columna origen y el VALUE que es la columna destino.
    private HashMap<Integer, Integer> relation;

    private Migration() {
    }

    public Migration(Table sourceTable, StatementRequest connectionSourceTable, Table destinyTable, StatementRequest connectionDestinyTable, HashMap<Integer, Integer> relation) {
        this.sourceTable = sourceTable;
        this.destinyTable = destinyTable;
        this.connectionSourceTable = connectionSourceTable;
        this.connectionDestinyTable = connectionDestinyTable;
        this.relation = relation;
    }

    /**
     * @return the sourceTable
     */
    public Table getSourceTable() {
        return sourceTable;
    }

    /**
     * @param sourceTable the sourceTable to set
     */
    public void setSourceTable(Table sourceTable) {
        this.sourceTable = sourceTable;
    }

    /**
     * @return the destinyTable
     */
    public Table getDestinyTable() {
        return destinyTable;
    }

    /**
     * @param destinyTable the destinyTable to set
     */
    public void setDestinyTable(Table destinyTable) {
        this.destinyTable = destinyTable;
    }

    /**
     * @return the relation
     */
    public HashMap<Integer, Integer> getRelation() {
        return relation;
    }

    /**
     * @param relation the relation to set
     */
    public void setRelation(HashMap<Integer, Integer> relation) {
        this.relation = relation;
    }

    /**
     * @return the connectionSourceTable
     */
    public StatementRequest getConnectionSourceTable() {
        return connectionSourceTable;
    }

    /**
     * @param connectionSourceTable the connectionSourceTable to set
     */
    public void setConnectionSourceTable(StatementRequest connectionSourceTable) {
        this.connectionSourceTable = connectionSourceTable;
    }

    /**
     * @return the connectionDestinyTable
     */
    public StatementRequest getConnectionDestinyTable() {
        return connectionDestinyTable;
    }

    /**
     * @param connectionDestinyTable the connectionDestinyTable to set
     */
    public void setConnectionDestinyTable(StatementRequest connectionDestinyTable) {
        this.connectionDestinyTable = connectionDestinyTable;
    }
}
